import { ArgumentsHost, Catch, ExceptionFilter, HttpException, HttpStatus } from '@nestjs/common';

@Catch()
export class HttpExceptionFilter implements ExceptionFilter {
  catch(exception: HttpException, host: ArgumentsHost) {
    const request = host.switchToHttp().getRequest();
    const response = host.switchToHttp().getResponse();

    const exceptionStatus = exception.getStatus() || HttpStatus.INTERNAL_SERVER_ERROR;

    const errorResponse = exception.getResponse();

    // return response.status(exceptionStatus).jsonp(data)
  }
}
